package com.zagj.videocomparess.utils;

import android.content.Context;

/**
 * Created by Chen qin lang on 2018/6/28.
 */

public class MediaLive {
    private static MediaLive mInstance;

    public static void init(Context context) {
        mInstance = new MediaLive();
    }

    public static MediaLive getInstance() {
        if (mInstance == null) {
            throw new RuntimeException("FFmpegHandle must init fist");
        }
        return mInstance;
    }

    static {
        System.loadLibrary("smedialive");
    }

    public native int initVideo(String liveUrl);

    public native int onFrameCallback(byte[] data);

    public native int openUrl(String input_file, String network);

    public native int stop();

    public native int startAudio(byte[] bb, int size);

}